export default class Event{
    [key:string]: any
    type: string = ''
    timeStamp: number
    target: any = null
    currentTarget: any = null
    touches: any
    changedTouches:any
    data: any = null
    readonly isTrusted: boolean = true
    readonly bubbles: boolean = true
    readonly defaultPrevented: boolean = false
    constructor(){
        this.timeStamp = Date.now()
    }
    public stopPropagation(){
        if(!this.bubbles) return
        Object.defineProperty(this, 'bubbles', {
            value: false,
            configurable: false,
            writable: false,
            enumerable: true
        })
        return
    }
    public preventDefault(){
        if(this.defaultPrevented) return
        Object.defineProperty(this, 'defaultPrevented', {
            value: true,
            configurable: false,
            writable: false,
            enumerable: true
        })
    }
}